package com.qidian.tcba.admin.api.controller;


import com.qidian.tcba.admin.model.dto.attachment.ReferenceAttachmentsDTO;
import com.qidian.tcba.admin.service.RecordedReferenceAttachmentsService;
import com.qidian.tcba.utils.result.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 备案参考附件表 前端控制器
 * </p>
 *
 * @author 冯永龙
 * @since 2021-07-06
 */
@RestController
@RequestMapping("/recordedReferenceAttachments")
@Api(tags ="备案申请模板")
public class RecordedReferenceAttachmentsController {

    @Autowired
    private RecordedReferenceAttachmentsService recordedReferenceAttachmentsService;

    @ApiOperation("获取所有备案申请模板")
    @GetMapping("/getAll")
    public JsonResult getAllRecordedReferenceAttachments(){
        List<ReferenceAttachmentsDTO> attachmentsList = recordedReferenceAttachmentsService.getAllReferenceAttachmentsList();
        return JsonResult.success().data("row",attachmentsList);
    }

}

